Skip to content

Fix ZEND_FASTCALL definition wrt. x64 Windows clang builds #15425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2024

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Aug 15, 2024

As is, MSVC uses __vectorcall, but clang uses __cdecl. This obviously is bad for interoperability (and causes link issues), and is likely worse for FFI which offers some limited (but likely sufficient for our purposes) support for __vectorcall on Windows.

Since clang claims to support __vectorcall as of 3.6.0, and we bumped the requirements to clang 4.0.0 already, there shouldn't be any issues.


I've did a minimal x64 clang 4.0.0 build on Windows (configure --disable-all --enable-cli --with-toolset=clang) and didn't notice any issues (tests/ where running fine, and the function names where mangled appropriately).

For some more details see also #15415 (comment).

As is, MSVC uses `__vectorcall`, but clang uses `__cdecl`.  This
obviously is bad for interoperability (and causes link issues), and is
likely worse for FFI which offers some limited (but likely sufficient
for our purposes) support for `__vectorcall` on Windows.

Since clang claims to support `__vectorcall` as of 3.6.0, and we bumped
the requirements to clang 4.0.0 already, there shouldn't be any issues.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@cmb69 cmb69 merged commit f16cb18 into php:master Aug 18, 2024
10 checks passed
@cmb69 cmb69 deleted the cmb/clang-fastcall branch August 18, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants